<table align="center" width="500" border="0">
    <tr>
        <td class="title">Stt</td>
        <td class="title">Name</td>
    </tr>
    <?php
	if(isset($_POST['ok'])){
		if($_POST['user']==""){
			echo "Vui long nhap ten can tim!";	
		}else{
			$user=$_POST['user'];
		}	
	}
	if($user){
	$conn=mysql_connect("localhost","root","vertrigo") or die("can't connect this database");
	mysql_select_db("tdc",$conn);
	$sql="select * from staffs where name LIKE '%$user%'";
	$query=mysql_query($sql);
        if(mysql_num_rows($query)!="")
        {
            $stt=1;
            while($row=mysql_fetch_array($query))
                {
                     $stt++;
                     echo "<tr>";
                     echo "<td>".$row['id']."</td>";
                     echo "<td>".$row['name']."</td>";
                     echo "</tr>";
                     
                }
        }
        else
        {
            echo "<tr><td colspan='4' align='center'>Khong Tim Thay Ten</td></tr>";
        }
        }
        ?>
</table>